﻿namespace Tzx.TUpdater.Entity
{
    /// <summary>
    /// 用于封装下载进度状态
    /// </summary>
    internal class UpdateState
    {
        /// <summary>
        /// 下载进度状态
        /// </summary>
        /// <param name="count">文件总个数</param>
        /// <param name="currentFileIndex">当前文件索引</param>
        /// <param name="currentFileDownPercent">当前文件百分比</param>
        internal UpdateState(int count, int currentFileIndex, int currentFileDownPercent)
        {
            _fileCount = count;
            _currentFileIndex = currentFileIndex;
            _currentFileDownPercent = currentFileDownPercent;
        }

        /// <summary>
        /// 文件总数
        /// </summary>
        internal int FileCount
        {
            get { return _fileCount; }
            set { _fileCount = value; }
        }
        private int _fileCount;

        /// <summary>
        /// 当前文件索引(0 ~ 文件总数-1)
        /// </summary>
        internal int CurrentFileIndex
        {
            get { return _currentFileIndex; }
            set { _currentFileIndex = value; }
        }

        private int _currentFileIndex;

        /// <summary>
        /// 当前文件下载进度百分比(0% ~ 100%)
        /// </summary>
        internal int CurrentFileDownPercent
        {
            get { return _currentFileDownPercent; }
            set { _currentFileDownPercent = value; }
        }
        private int _currentFileDownPercent;

    }
}